package fx.mine.active.component;

import io.github.palexdev.materialfx.controls.MFXScrollPane;
import javafx.geometry.Insets;
import javafx.scene.control.ScrollPane;
import lombok.extern.log4j.Log4j2;

@Log4j2
public class SideScrollPane extends MFXScrollPane {

    public SideScrollPane() {
        this.setFitToWidth(true);
        this.setHbarPolicy(ScrollPane.ScrollBarPolicy.NEVER);
        this.setPadding(new Insets(0, 10, 0, 0));

        //添加导航按钮
        addNavigationButtons();

        this.getStyleClass().add("scrollPane");
        getStylesheets().add(getClass().getResource("/css/sideScrollPane.css").toExternalForm());
    }

    private void addNavigationButtons() {
        var vbox = new NavButtonContainer();
        setContent(vbox);
        this.applyCss();
    }

}
